export interface EvTypes {
  item: EvItemType;
  cancel: boolean;
  source: EvModelType;
  target: EvModelType;
  action: string;
  model: EvModelType;
}

export interface EvItemType {
  model: EvModelType;
  getEdges: () => EvEdgeType[];
}

export interface EvModelType {
  id: string;
  name: string;
  label: string;
  exprType?: string;
  driveMode?: string;
  events?: FlowEvent[];
}
export interface FlowEvent {
  nodeEntryEvent: [];
  nodeLeaveEvent: [];
  nodeEntryInterceptor: [];
  nodeLeaveInterceptor: [];
  taskCompletedEvent: [];
}

export interface EvEdgeType {
  props: Record<string,unknown>;
  flow: Record<string,unknown>;
}

// export interface contentData {}

export interface cfg {
  container: any;
}
export interface modeCfg {
  default: string[];
  add: string[];
  resize: string[];
  readOnly: string[];
  move: string[];
  multiSelect: string[];
}
export type onFunc = (type: string, func: (e: any) => void) => void;
export interface graphTypes {
  setFitView: (param: string) => void;
  on: onFunc;
  update: (data: any, params: Record<string, unknown>) => void;
}

export interface flowCfg extends cfg {
  modes: modeCfg;
  mode: string;
}
export interface graphCfg {
  graph: flowCfg;
  noEndEdge: boolean;
}
